package com.example.springcloud.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/config-center")
public class ConfigController {

    @GetMapping("/getConfigProd")
    public String getConfigProd() {

        return "redirect:http://localhost:3344/spring-cloud/master/config-prod.yml";
    }

    @GetMapping("/getConfigTest")
    public String getConfigTest() {

        return "redirect:http://localhost:3344/spring-cloud/master/config-test.yml";

    }

    @GetMapping("/getConfigDev")
    public String getConfigDev() {

        return "redirect:http://localhost:3344/spring-cloud/master/config-dev.yml";

    }

    @GetMapping("/getReadme")
    public String getReadme() {

        return "redirect:http://localhost:3344/spring-cloud/master/README.md";

    }

}
